//package com.t2two.example.common.generator;
//
//import org.springframework.stereotype.Service;
//
///**
// * @description:
// * @company: 智蓝图汇
// * @author: bruce lan/00001
// * @date: 2022/5/26 15:21
// */
//@Service
//public class CodeService {
//    private static final String url = "jdbc:mysql://192.168.1.74:3307/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull";
////    private static final String dynamicUrl = "jdbc:mysql://218.75.75.250:35306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
//    private static final String dynamicUrl = "jdbc:mysql://192.168.1.197:5306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
////    private static final String dzDcmUrl = "jdbc:mysql://47.100.94.72:3306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
//    private static final String dzDcmUrl = "jdbc:mysql://192.168.1.197:13306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
//    private static final String myUrl = "jdbc:mysql://118.31.7.4:3306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useSSL=false";
//    private static final String guildWebsiteUrl = "jdbc:mysql://192.168.1.197:23326/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
//    private static final String fastMailUrl = "jdbc:mysql://150.158.236.17:13306/{{db_name}}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8";
////    @Value("${spring.datasource.druid.username}")
////    private String username;
////
////    @Value("${spring.datasource.druid.password}")
////    private String password;
////    @Autowired
////    private Environment environment;
//
//
//    public void codeGenerate(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = url.replace("{{db_name}}", dbName);
//        CodeGenerator2.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"haijiao_dev", "Nbzlth@0127");
//    }
//
//    public void codeMySQLDcmGenerate(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = dzDcmUrl.replace("{{db_name}}", dbName);
//        CodeGenerator2.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"huanqiu", "Huanqiu88");
//    }
////    public void codeGenerate1(CodeParam param) {
//////        String dbName = param.getDatabaseName();
//////        String property = environment.getProperty("mysql.url");
//////        String property1 = environment.getProperty("mysql.username");
//////        String property2 = environment.getProperty("mysql.password");
////        String dbName = param.getDatabaseName();
////        String mysqlUrl = url.replace("{{db_name}}", dbName);
////        CodeGenerator.generator1(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"haijiao_dev", "Nbzlth@0127","2");
////    }
////
//    public void codeGenerateMySelf(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = myUrl.replace("{{db_name}}", dbName);
//        CodeGenerator1.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"root", "P@ssw0rd");
//    }
////
//    public void codeGenerateHb(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = dynamicUrl.replace("{{db_name}}", dbName);
//        CodeGenerator.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"hb_dev", "Nbzlth@0127","3");
//    }
//
//
//    public void codeGenerateGuildWebsite(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = guildWebsiteUrl.replace("{{db_name}}", dbName);
//        CodeGenerator.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"root", "Nbzlth@0127","3");
//    }
//
//    public void codeGenerateFastMail(CodeParam param) {
//        String dbName = param.getDatabaseName();
//        String mysqlUrl = fastMailUrl.replace("{{db_name}}", dbName);
//        CodeGenerator.generator(param.getModuleName(), param.getDirName(), param.getTableName(), param.getPackageName(), mysqlUrl,"root", "P@ssw0rd","3");
//    }
//}
